#include "lasershow.hpp"
#include "unistd.h"
/*csv文件读取测试程序*/
using namespace std;
int main(int argc, char *argv[])
{

	// Mat image = Mat(300,300,CV_8UC3,Scalar(255,255,255));
	// rectangle(image,Point(50,50),Point(100,100),Scalar(255,0,0),2);
	// namedWindow("Test"); 
	// imshow("Test",image); 
	// waitKey(0);
	LaserShow LS;
	Mat showimage;
	if(argc > 3|| argc ==1) { cout << "参数超出限定数量"<< endl; return false;}

	LS.laserShowInit(800,800,argv[1]);
	LS.laserDataReadFromCSVfile(argv[2]);
	for(auto it =LS.laser_data.begin();it!=LS.laser_data.end();it++)
	{
		LS.drawLaserImage(&showimage,*it);
		LS.lasershow(showimage);
		waitKey(25);
	} 
	waitKey(0);
    return 0;
}
